package com.sq.foursm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.sq.foursm.entity.SecRole;
import com.sq.foursm.entity.SecRoleExample;
import com.sq.foursm.entity.SecRoleExample.Criteria;
import com.sq.foursm.mapper.SecRoleMapper;
import com.sq.foursm.service.RoleService;
/**
 * 角色查询的service
 * @author SQ
 * 2017年7月7日
 * 下午2:34:26
 */
public class RoleServiceImpl  implements RoleService{
	
	@Resource
	private SecRoleMapper secRoleMapper;

	@Override
	public SecRole findRoleByid(int roleid) throws Exception {
		SecRoleExample secRoleExample = new SecRoleExample();
		Criteria createCriteria = secRoleExample.createCriteria();
		createCriteria.andRoleIdEqualTo(roleid);
		List<SecRole> selectByExample = secRoleMapper.selectByExample(secRoleExample);
		return selectByExample.get(0);
	}

	
	
	
	
	
	
	
	
	
	

}
